<%--
  Created by IntelliJ IDEA.                                                                        Export options
  User: luiza
  Date: 05/09/12
  Time: 00:16
  To change this template use File | Settings | File Templates.
--%>

<%@ include file="/taglibs.jsp"%>

<title><fmt:message key="contato.list.title"/></title>

<button onclick="location.href='contatoForm'" style="float: right; margin-top: -30px; width: 100px">Novo Contato</button>
<form:form commandName="contato" method="POST" action="contatosFilter" id="contatoListForm">
<select name="filterOption" id="filterOption">
    <option value="Todos">Todos</option>
    <option value="LetraInicial">Nome</option>
    <option value="Grupo">Grupo</option>
</select>
<input type="text" name="filterValue"/>
<span title="Na pesquisa por 'Nome' ou 'Grupo', basta informar a letra inicial ou colocar o nome completo do contato."><div style="display:inline-block; width: 15px; height: 15px;background-image:url('/images/dica5.png');"></div></span>
<input type="submit" value="Filtrar" style="float: right; margin-top: 0px; width: 100px" class="filtroContato"/>
<display:table name="contatoList" class="table" requestURI="contatos" id="contatoList" export="true" pagesize="10" excludedParams="ajax">
    <display:setProperty name="export.pdf.filename" value="contatos.pdf"/>
    <display:column property="id" sortable="true" href="contatoForm" media="html" paramId="id" paramProperty="id" titleKey="contato.id"/>
    <display:column property="id" media="csv excel xml pdf" titleKey="contato.id"/>
    <display:column property="nome" sortable="true" titleKey="contato.nome" escapeXml="true"/>
    <display:column property="email" sortable="true" titleKey="contato.email" escapeXml="true"/>
    <display:column property="grupo.descricao" sortable="true" titleKey="contato.grupo" escapeXml="true"/>
</display:table>
</form:form>
<script type="text/javascript">highlightTableRows("contatoList");</script>